package com.health;

import android.os.Parcel;
import android.os.Parcelable;

import com.github.mikephil.charting.data.Entry;

import java.io.Serializable;
import java.util.List;

/**
 * 作　　者: guyj
 * 修改日期: 2017/4/3
 * 描　　述:
 * 备　　注:
 */

public class HealthBean implements Parcelable {
    private String name;//指标名字
    private List<Entry> data1;//指标的数据1
    private List<Entry> data2;//指标的数据2，预留一个指标里有2种数据类型时使用
    private List<Entry> data3;//指标的数据3，预留一个指标里有3种数据类型时使用
    private String suggest;//相关建议

    public HealthBean(){}

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<Entry> getData1() {
        return data1;
    }

    public void setData1(List<Entry> data1) {
        this.data1 = data1;
    }

    public List<Entry> getData2() {
        return data2;
    }

    public void setData2(List<Entry> data2) {
        this.data2 = data2;
    }

    public List<Entry> getData3() {
        return data3;
    }

    public void setData3(List<Entry> data3) {
        this.data3 = data3;
    }

    public String getSuggest() {
        return suggest;
    }

    public void setSuggest(String suggest) {
        this.suggest = suggest;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel out, int flags)
    {
        out.writeString(name);
        out.writeList(data1);
        out.writeList(data2);
        out.writeList(data3);
        out.writeString(suggest);
    }

    public static final Parcelable.Creator<HealthBean> CREATOR = new Creator<HealthBean>()
    {
        @Override
        public HealthBean[] newArray(int size)
        {
            return new HealthBean[size];
        }

        @Override
        public HealthBean createFromParcel(Parcel in)
        {
            return new HealthBean(in);
        }
    };

    public HealthBean(Parcel in)
    {
        name = in.readString();
        data1 = in.readArrayList(Entry.class.getClassLoader());
        data2 = in.readArrayList(Entry.class.getClassLoader());
        data3 = in.readArrayList(Entry.class.getClassLoader());
        suggest = in.readString();
    }
}
